<template>
  <div class="container">
    <upload-file :files="fileList" @refresh="getFileList"></upload-file>
  </div>
</template>

<script>
import UploadFile from '@/components/UploadFile'
import { getFileList } from '@/api/file'

export default {
  components: {
    UploadFile
  },
  data() {
    return {
      fileList: []
    };
  },
  created() {
    this.getFileList("")
  },
  methods: {
    getFileList(prefix) {
      getFileList({ prefix: prefix }).then(res => {
        this.fileList = res.data
      })
    }
  }
}
</script>

<style lang="less" scoped>
.container {
  padding: 100px 50px;
}
</style> scoped>